<?php

namespace App\Service\OrderService\OrderRouteService;

use App\Service\Code\Normal;
use App\Service\OrderService\BaseSupplierRouterService;
use App\Service\VendorClient\Shoptangyin\ShoptangyinApiClient;
use App\Service\TraitService\SupplierRouterOrderTrait;

/***
 * 重庆-唐印上游对接
 * @author: hj
 */
class Shoptangyin extends BaseSupplierRouterService {

    use SupplierRouterOrderTrait;

    /**
     * 订单申报
     * @param array $param
     * @return array
     */
    public function orderPay($param = []) {
        return $this->callSdkApi(ShoptangyinApiClient::class, $param['apiBody'])->createOrder($param);
    }

    /**
     * 订单取消
     * @param array $param
     * @return array
     */
    public function orderCancel($param = []) {
        return Normal::returnCode(Normal::SUC, "处理完成");
    }

    /**
     * 订单售后
     * @param array $param
     * @return array
     */
    public function orderAfterSale($param = []) {
        return $this->callSdkApi(ShoptangyinApiClient::class,$param['apiBody'])->cancelOrder($param);
    }

    /**
     * 获取物流信息
     * @param array $param
     */
    public function orderExpress($param = []) {
        return Normal::returnCode(Normal::SUC, "处理完成");
    }

    /**
     * 商品列表查询接口
     * @param array $param
     * @return array
     */
    public function queryGoodsList($param = []) {
        return Normal::returnCode(Normal::SUC, "处理完成");
    }
}